﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;

[assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]
namespace Aide
{
    public class LoggerHelper
    {
        private static readonly log4net.ILog log =
            log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
        //private static readonly log4net.ILog log =
        //        log4net.LogManager.GetLogger("SingleFile");

        public static void Debug(string message)
        {
            log.Debug(message);
        }

        public static void Debug(string message, Exception innerException)
        {
            log.Debug(message, innerException);
        }

        public static void Info(string message)
        {
            log.Info(message);
        }

        public static void Info(string message, Exception innerException)
        {
            log.Info(message, innerException);
        }

        public static void Warn(string message)
        {
            log.Warn(message);
        }

        public static void Warn(string message, Exception innerException)
        {
            log.Warn(message, innerException);
        }

        public static void Error(string message)
        {
            log.Error(message);
        }

        public static void Error(string message, Exception innerException)
        {
            log.Error(message, innerException);
        }

        public static void Fatal(string message)
        {
            log.Fatal(message);
        }

        public static void Fatal(string message, Exception innerException)
        {
            log.Fatal(message, innerException);
        }

    }

}